package com.iwhalecloud.citybrain.flow.platform.manager.domain.repository;

import com.iwhalecloud.citybrain.flow.platform.manager.common.ResponseResult;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.*;

import java.util.List;

/**
 * @author Huhangfei
 * @date 2021-11-16 17:55
 */
public interface FlowEntrustRepository {

    /**
     * 增加流程委托或者修改流程委托
     * @param flowEntrustVo
     * @return 是否成功
     */
    ResponseResult insertOrUpdate(FlowEntrustVo flowEntrustVo);
    /**
     * 增加流程委托
     *
     * @param flowEntrustVo
     * @return 是否成功
     */
    ResponseResult insertFlowEntrust(FlowEntrustVo flowEntrustVo);

    /**
     * 修改默认流程委托
     * @param flowEntrustVo
     * @return 是否成功
     */
    ResponseResult updateFlowEntrust(FlowEntrustVo flowEntrustVo);
    /**
     * 查询流程委托
     * @param
     * @return 是否成功
     */
    List<FlowEntrustVo> selectFlowEntrust(FlowEntrustQueryVo flowEntrustQueryVo);


    /**
     * 删除用户默认流程委托的数据
     * @param flowEntrustVo
     * @return 是否成功
     */
    ResponseResult deleteFlowEntrustData(FlowEntrustVo flowEntrustVo);
    /**
     * 删除自定义委托数据
     * @param ids
     * @return 是否成功
     */
    boolean deleteFlowEntrustDetailData(List<Integer> ids);

    /**
     * 查询默认委托和自定义委托数据
     * @param flowEntrustVo
     * @return 是否成功
     */

    List<FlowEntrustVo>  selectFormEntrustAndDetail(FlowEntrustQueryVo flowEntrustVo);

    /**
     * 根据委托人和modelKey查询委托信息
     * @param flowEntrustQueryForComputeVo
     * @return
     */

    FlowEntrustVo selectByClientAndModelKey(FlowEntrustQueryForComputeVo flowEntrustQueryForComputeVo);


    /**
     * 更新默认委托的状态或者自定义委托的状态
     * @param flowEntrustUpdateVo
     * @return
     */
    ResponseResult updateStatus(FlowEntrustUpdateVo flowEntrustUpdateVo);

    /**
     * 逻辑删除默认委托或者自定义委托
     * @param flowEntrustUpdateVo
     * @return
     */
    ResponseResult deleteEntrustOrDetail(FlowEntrustUpdateVo flowEntrustUpdateVo);


    String transferOrgCodeToName(String orgCode);

    /**
     * 条件查询 测试
     * @param flowEntrustQueryVo
     * @return
     */
    List<FlowEntrustVo> selectEntrustByCondition2(FlowEntrustQueryVo flowEntrustQueryVo);

    /**
     * 加受托人的模糊查询
     * @param flowEntrustQueryVo
     * @return
     */
    List<FlowEntrustVo> selectEntrustByCondition(FlowEntrustQueryVo flowEntrustQueryVo);

    /**
     * 根据id查询默认委托和对应的自定义委托
     * @param flowEntrustQueryVo
     * @return
     */
    FlowEntrustVo selectEntrustById(FlowEntrustQueryVo flowEntrustQueryVo);


}
